/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package db;

import db.MySQLConnection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author katie
 */
public class DBtest {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            MySQLConnection conn = new MySQLConnection(args);
            ResultSet rs = conn.execute("describe users");
            System.out.println("\nColumns in relation 'users' (from DESCRIBE users;)");
            rs.first();
            do{
                System.out.println(rs.getString(1));
            }while(rs.next());
        } catch (SQLException ex) {
            Logger.getLogger(DBtest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
